package com.cx.service.admin.member.impl;

import com.cx.dao.impl.ChainJKTDaoSupport;
import com.cx.service.admin.member.ChainMemberManager;
import org.cx.entity.Page;
import org.cx.entity.PageData;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("chainMemberService")
public class ChainMemberService implements ChainMemberManager {

    @Resource(name = "chainJKTDaoSupport")
    private ChainJKTDaoSupport chainJKTDao;


    @Override
    public PageData findMemberInfo(PageData pd) throws Exception {
        return null;
    }

    @Override
    public List<PageData> findMemberDetail(PageData pd) throws Exception {
        List<PageData> list = (List<PageData>) chainJKTDao.findForList("MemberMapper.findMemberDetail", pd);
        return list;
    }

    @Override
    public List<PageData> findMemberDetailPage(Page pg) {
        List<PageData> list = (List<PageData>) chainJKTDao.findForList("MemberMapper.findMemberDetailPage", pg);
        return list;
    }

    @Override
    public Integer insertMember(PageData pd) {
        Integer result  =(Integer) chainJKTDao.save("MemberMapper.insertMember",pd);
        return result;
    }

    @Override
    public Integer updateMember(PageData pd) {
        Integer result  =(Integer) chainJKTDao.save("MemberMapper.updateMember",pd);
        return result;
    }
}
